Tips & Tricks
Use the Blotch Library
Before redeveloping existing concepts, have a look at the Blotch
Library to see if there is a component
or hook which solves your problem. If the component or hook doesn't exist, and you think it should, please raise it as a suggestion in our Forum or Discord for it to be added.
Visit the Blotch
Library documentation to get started
Easily create type definitions
If you are retrieving data from a server, you may want to type the Response
to enable auto-completion and type hints.
You can quickly create type definitions by using QuickType. Paste in a sample JSON
response and types are automatically generated for you. Copy and paste this into the top (just below imports
) of the Widget
!
Bypass CORS
CORS
is a common problem everyone faces, so we have created a proxy in our library to easily solve this.
Usage is simple and nicely integrated into React
as a Hook
. Learn more here in our library documentation
Always pin dependencies
As mentioned in the Dependencies section, it is important to pin dependencies to avoid breaking changes upstream breaking your Widget
.